home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Resources / Partition Logic 0.61 / partlogic-0.61.iso / system / headers / sys / image.h < prev    next >
Text File  |  2006-01-31  |  2KB  |  74 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2006 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  image.h
  20. //
  21.  
  22. // This file contains definitions and structures for using and manipulating
  23. // images in Visopsys.
  24.  
  25. #if !defined(_IMAGE_H)
  26.  
  27. // Definitions
  28. #define IMAGETYPE_MONO  1
  29. #define IMAGETYPE_COLOR 2
  30.  
  31. #define IMAGEFORMAT_BMP 1
  32. #define IMAGEFORMAT_JPG 2
  33.  
  34. #define MAXVIDEOMODES   20
  35.  
  36. // An enumeration for different drawing modes.
  37. typedef enum {
  38.   draw_normal, draw_reverse, draw_or, draw_xor, draw_translucent
  39. } drawMode;
  40.  
  41. // Structures for manipulating generic images.
  42.  
  43. typedef struct {
  44.   unsigned char blue;
  45.   unsigned char green;
  46.   unsigned char red;
  47.  
  48. } color;
  49.  
  50. typedef color pixel;
  51.  
  52. typedef struct {
  53.   int type;
  54.   color translucentColor;
  55.   unsigned pixels;
  56.   unsigned width;
  57.   unsigned height;
  58.   unsigned dataLength;
  59.   void *data;
  60.  
  61. } image;
  62.  
  63. // A data structure to describe a graphics mode
  64. typedef struct {
  65.   int mode;
  66.   int xRes;
  67.   int yRes;
  68.   int bitsPerPixel;
  69.  
  70. } videoMode;
  71.  
  72. #define _IMAGE_H
  73. #endif
  74.